home *** CD-ROM | disk | FTP | other *** search
/ Ozsi 10 / Ozsi_10_1998_Tide_Side_C.d64 / save ml (.txt) < prev   
Commodore BASIC  |  2023-02-26  |  1KB  |  22 lines

  1. 10 rem - 'save ml/4' using kernal rom routines. elaine 12/95
  2. 20 iffthen110
  3. 30 a=53280:pokea,1:pokea+1,1:poke646,6:printchr$(142)"[147]saving machine language from memory:
  4. 50 [153]"(1) ml is to be saved from memory":[153]"(2) ml on disk is to be copied
  5. 70 gosub240:onagoto160,80:goto70
  6. 80 na$="load":gosub250:open2,8,2,f$:get#2,bh$,bh$:n$=chr$(0)
  7. 90 bl=asc(bl$+n$):bh=asc(bh$+n$):print#2:close2:f=1:loadf$,8,1
  8. 110 el=peek(174):eh=peek(175):print"do you wish to modify this prg?":gosub240:ifa$="y"then270
  9. 130 na$="save":gosub250:print"ok. insert destination disk and press
  10. 140 [153]"any key to continue":[141]240:[137]210
  11. 160 na$[178]"save":[141]250:[133]"beginning address";ba$:[139]ba$[178]"*"[167][128]
  12. 170 ba[178][197](ba$):bh[178][181](ba[173]256):bl[178]ba[171](bh[172]256)
  13. 180 [133]"actual ending address";ea$:[139]ea$[178]"*"[167][128]
  14. 190 ea[178][197](ea$):ea[178]ea[170]1:eh[178][181](ea[173]256):el[178]ea[171](eh[172]256):[151]174,el:[151]175,eh
  15. 210 [151]193,bl:[151]194,bh:[158]57812f$,8:[158]62954:[159]15,8,15:[132]15,e,ff$,g,h:[160]15:[153]""ff$:[128]
  16. 240 [146]198,1:[161]a$:a[178][197](a$):[142]
  17. 250 [153]"(* to exit)":[153]"filename to "na$;:[133]f$:[139]f$[178]""[176]f$[178]"*"[167][128]
  18. 260 [142]
  19. 270 [153]"ok. for this prg":[153]"ba ="bl[170]256[172]bh"and ea+1 ="el[170]256[172]eh
  20. 280 [153]"prg is in memory at those locations.
  21. 290 print"make modifications and rerun this prg
  22.